﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Text;
using SqlSugar;

namespace Model.Models
{
    /// <summary>
    /// 菜单
    /// </summary>
    [SugarTable(tableName: "sys_Menu")]
    public class Menu : BaseDBModel
    {
        /// <summary>
        /// 菜单名称
        /// </summary>
        [StringLength(50)]
        [Description("菜单名称")]
        public string MenuName { get; set; } = "";

        /// <summary>
        /// 菜单代码
        /// </summary>
        [StringLength(500)]
        [Description("菜单代码")]
        public string? Code { get; set; } = "";

        /// <summary>
        /// 图标
        /// </summary>
        [StringLength(50)]
        [Description("图标")]
        public string? Icon { get; set; } = "";

        /// <summary>
        /// 地址
        /// </summary>
        [StringLength(50)]
        [Description("地址")]
        public string? LinkUrl { get; set; } = "";

        /// <summary>
        /// 父级菜单ID
        /// </summary>
        [StringLength(50)]
        [Description("父级菜单ID")]
        public string? ParentId { get; set; } = "";

        /// <summary>
        /// 菜单登记 1 一级  2 二级 以此类推
        /// </summary>
        [StringLength(2)]
        [Description("菜单登记 1 一级  2 二级 以此类推")]
        public int Level { get; set; } = 1;

        /// <summary>
        /// 1 启用 2 禁用 等其他
        /// </summary>
        [Description("1 启用 2 禁用 等其他")]
        public int EnableState { get; set; } = 1;

        /// <summary>
        /// 排序
        /// </summary>
        [Description("排序")]
        public int Sort { get; set; } = 0;

    }
}
